﻿using System.Collections;
using System.Collections.Generic;
using UnityEngine;

/// <summary>
/// 管理阵法对象的控制器
/// </summary>
public class MagicController : BaseManager<MagicController>
{
    int num = 0;
    //存放所有阵法的
    List<MagicGraph> magicGraphs;
    public List<MagicGraph> MagicGraphs
    {
        get
        {
            return magicGraphs;
        }
        set
        {
            magicGraphs = value;
        }
    }
    public MagicController()
    {
        magicGraphs = new List<MagicGraph>();
    }
    public void AddNewMagicGraph(MagicGraph magicGraph)
    {
        magicGraph.MagicGraphNumber = num++;
        MagicGraphs.Add(magicGraph);
    }
    public void DeOnTest()
    {
        for (int i = 0; i < magicGraphs.Count; i++)
        {
            magicGraphs[i].CreatMagicGraphLinePassGrid();
        }
    }

    public void Recycle()
    {
        for (int i = 0; i < MagicGraphs.Count; i++)
        {
            MagicGraphs[i].Recycle();
        }
    }
}
